<div id="content">
<?php
if (!empty($results->results)) {
?>
 <form id="list">
    <table>
      <tr>
        <td colspan="7" class="tablebar">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left">&nbsp;</td>
                <td align="right"><span class="page_link"><?php echo $results->pagelink; ?></span></td>
              </tr>
            </table>
        </td>
        </tr>

      <tr>
        <th>留言标题</th>
        <th>留言人</th>
        <th>联系方式</th>
        <th>留言时间</th>
        <th>留言IP</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
<?php
foreach($results->results as $post) {
?>
      <tr>
        <td><?php echo $html->admin_link(empty($post->title) ? '尚未添加标题' : $post->title, '/manage_guestbook/show_guestbook/' . $post->id); ?></td>
        <td><?php echo $post->author; ?></td>
        <td><?php echo $post->author_contact; ?></td>
        <td><?php echo date('Y-m-d H:i', $post->post_time); ?></td>
        <td><?php echo $post->author_ip; ?></td>
        <td><?php echo show_al_guestbook_status($post->status); ?></td>
        <td><?php echo $html->admin_link('删除', '/manage_guestbook/delete/' . $post->id . '?' . $this_url); ?></td>
      </tr>
<?php
}
?>
      <tr>
        <td colspan="7" class="tablebar">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left">&nbsp;</td>
                <td align="right"><span class="page_link"><?php echo $results->pagelink; ?></span></td>
              </tr>
            </table>
        </td>
        </tr>
    </table>
  </form>
<?php
} else {
    echo '暂无任何留言.';
}
?>
</div>
